package com.lanvideo.entity;

import java.time.LocalDateTime;

/**
 * 视频实体类
 */
public class Video {
    private Integer id;
    private String title;
    private String intro;
    private String tags;
    private String path;
    private Integer uploaderId;
    private String uploaderName; // 上传者姓名
    private LocalDateTime uploadTime;
    private Integer status; // 视频状态：0-待审核，1-已通过，2-已拒绝
    private String rejectReason; // 拒绝原因
    private Integer viewCount; // 观看次数

    public Video() {}

    public Video(String title, String intro, String tags, String path, Integer uploaderId) {
        this.title = title;
        this.intro = intro;
        this.tags = tags;
        this.path = path;
        this.uploaderId = uploaderId;
    }

    // Getters and Setters
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Integer getUploaderId() {
        return uploaderId;
    }

    public void setUploaderId(Integer uploaderId) {
        this.uploaderId = uploaderId;
    }

    public String getUploaderName() {
        return uploaderName;
    }

    public void setUploaderName(String uploaderName) {
        this.uploaderName = uploaderName;
    }

    public LocalDateTime getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(LocalDateTime uploadTime) {
        this.uploadTime = uploadTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRejectReason() {
        return rejectReason;
    }

    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }

    public Integer getViewCount() {
        return viewCount;
    }

    public void setViewCount(Integer viewCount) {
        this.viewCount = viewCount;
    }

    @Override
    public String toString() {
        return "Video{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", intro='" + intro + '\'' +
                ", tags='" + tags + '\'' +
                ", path='" + path + '\'' +
                ", uploaderId=" + uploaderId +
                ", uploaderName='" + uploaderName + '\'' +
                ", uploadTime=" + uploadTime +
                ", status=" + status +
                ", rejectReason='" + rejectReason + '\'' +
                ", viewCount=" + viewCount +
                '}';
    }
}
